Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent event id for echo #3

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Parent event id for echo #3

wants to merge 19 commits into from

Conversation

Topru333
Copy link
Contributor

No description provided.

@Topru333 Topru333 requested a review from cordwelt July 14, 2021 02:04
@Topru333 Topru333 self-assigned this Jul 14, 2021
@Topru333 Topru333 requested a review from cordwelt July 16, 2021 21:58
# Conflicts:
#	README.md
#	gradle.properties
#	src/main/kotlin/com/exactpro/th2/ws/client/api/impl/WebSocketClient.kt
@Topru333 Topru333 requested a review from cordwelt August 7, 2021 17:14
@@ -152,7 +154,7 @@ fun run(
require(messagesCount == 1) { "Message group contains more than 1 message" }
val message = messagesList[0]
require(message.hasRawMessage()) { "Message in the group is not a raw message" }
settings.frameType.send(client, message.rawMessage.body.toByteArray())
settings.frameType.send(client, message.rawMessage.body.toByteArray(), message.rawMessage.parentEventId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message.rawMessage.parentEventId

It'll always be non-null. We should check its presence through hasParentEventId method instead and pass null if it returns false

@@ -121,7 +122,7 @@ class WebSocketClient(
if (last) {
val message = if (binaryFrames.isEmpty()) frame else binaryFrames.reduce(ByteArray::plus)
handler.onBinary(this, message)
onMessage(message, false, FIRST)
onMessage(message, true, FIRST, null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onMessage(message, true, FIRST, null)
onMessage(message, false, FIRST, null)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants